package com.ktjy;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.*;

/**
 * @author lqm
 * @ClassName AutoGenerator
 * @description: TODO
 */
public class AutoGeneratorUtil {


    public static void main(String[] args) {
        AutoGenerator autoGenerator = new AutoGenerator(new DataSourceConfig.Builder(
                "jdbc:mysql://localhost:3316/cvs_db?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai",
                "root",
                "root").build());
        autoGenerator.global( new GlobalConfig.Builder().outputDir("D://Temp").author("liuqiaomiao").build());
        autoGenerator.packageInfo(new PackageConfig.Builder("com.ktjy","ch03").build());
        autoGenerator.strategy(new StrategyConfig.Builder().build());
        autoGenerator.template(new TemplateConfig.Builder().controller("templates/controller.java").build());
        autoGenerator.execute();
    }

}
